package com.bee.bootstrap.role.entity;

import java.util.Arrays;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import com.bee.bootstrap.resource.entity.Resource;
import com.bee.common.core.enums.PermissionLevelEnum;
import com.bee.common.core.enums.StatusEnum;
import lombok.Data;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 
 * </p>
 *
 * @author liekkas
 * @since 2018-05-25
 */
@TableName("base_role")
@Data
public class Role extends Model<Role> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
	@TableId(value="id", type= IdType.ID_WORKER)
	private Long id;
    /**
     * 角色名称
     */
	private String role;
    /**
     * 角色编码
     */
	private String code;
    /**
     * 角色描述
     */
	private String description;
    /**
     * 创建时间
     */
	@TableField("create_time")
	private Date createTime;
    /**
     * 有效时间
     */
	@TableField("update_time")
	private Date updateTime;
    /**
     * 状态
     */
	private String status;

	private transient List<Resource> roleResources;

	private transient String roleQuery;
	private transient String codeQuery;
	private transient String statusView;

	private transient List<StatusEnum> statusEnums= Arrays.asList(StatusEnum.NORMAL,StatusEnum.INVALID);

	@Override
	protected Serializable pkVal() {
		return this.id;
	}

}
